﻿@page "/tables/header"

<h3>@FixheaderLocalizer["Title"]</h3>

<h4>@FixheaderLocalizer["Desc"]</h4>

<p>@((MarkupString)FixheaderLocalizer["DescP"].Value)</p>

<DemoBlock Title="@FixheaderLocalizer["FixedHeaderTitle"]" Introduction="@FixheaderLocalizer["FixedHeaderIntro"]" Name="FixedHeader">
    <p>@FixheaderLocalizer["FixedHeaderP"]</p>
    <p>@FixheaderLocalizer["FixedHeaderP1"]</p>
    <Table TItem="Foo" Items="@Items.Take(10)" Height="200" IsBordered="true" IsFixedHeader="true">
        <TableColumns>
            <TableColumn @bind-Field="@context.DateTime" Width="180" />
            <TableColumn @bind-Field="@context.Name" Width="100" />
            <TableColumn @bind-Field="@context.Address" />
        </TableColumns>
    </Table>
</DemoBlock>

<DemoBlock Title="@FixheaderLocalizer["FixedWidthTitle"]" Introduction="@FixheaderLocalizer["FixedWidthIntro"]" Name="FixedWidth">
    <p>@FixheaderLocalizer["FixedWidthP"]</p>
    <Table TItem="Foo" Items="@Items.Take(10)" IsBordered="true" IsMultipleSelect="true" Height="200" IsFixedHeader="true">
        <TableColumns>
            <TableColumn @bind-Field="@context.DateTime" Width="180" />
            <TableColumn @bind-Field="@context.Name" Width="100" />
            <TableColumn @bind-Field="@context.Address" Width="900" />
        </TableColumns>
    </Table>
</DemoBlock>

<DemoBlock Title="@FixheaderLocalizer["AllowResizingTitle"]" Introduction="@FixheaderLocalizer["AllowResizingIntro"]" Name="AllowResizing">
    <p>@((MarkupString)FixheaderLocalizer["AllowResizingP"].Value)</p>
    <Table TItem="Foo" Items="@Items.Take(10)"
           IsBordered="true" IsMultipleSelect="true" IsPagination="true" IsFixedHeader="true"
           Height="200" AllowResizing="true">
        <TableColumns>
            <TableColumn @bind-Field="@context.DateTime" Width="180" />
            <TableColumn @bind-Field="@context.Name" Width="100" />
            <TableColumn @bind-Field="@context.Address" Width="900" />
        </TableColumns>
    </Table>
</DemoBlock>

<DemoBlock Title="@FixheaderLocalizer["AutoHeightTitle"]" Introduction="@FixheaderLocalizer["AutoHeightIntro"]" Name="AutoHeight">
    <p>@((MarkupString)FixheaderLocalizer["AutoHeightP"].Value)</p>
    <div style="height: 300px;">
        <Table TItem="Foo" Items="@Items.Take(10)" ShowColumnList="true" ShowToolbar="true" ShowDefaultButtons="false" ShowRefresh="false"
               IsBordered="true" IsMultipleSelect="true" IsPagination="true" IsFixedHeader="true" AllowResizing="true">
            <TableColumns>
                <TableColumn @bind-Field="@context.DateTime" Width="180" />
                <TableColumn @bind-Field="@context.Name" Width="100" />
                <TableColumn @bind-Field="@context.Address" Width="900" />
            </TableColumns>
        </Table>
    </div>
</DemoBlock>
